FROM debian:13.2-slim
LABEL author=xiaoyilin
LABEL email=406735078@qq.com
ENV TZ=Asia/Shanghai
ARG CMAKE_VERSION
ENV CMAKE_VERSION=${CMAKE_VERSION}
ADD cmake-$CMAKE_VERSION-linux-x86_64.tar.gz /usr/local/
ENV  CMAKE_HOME=/usr/local/cmake-$CMAKE_VERSION-linux-x86_64
ENV  PATH=$PATH:$CMAKE_HOME/bin
CMD ["cmake","--version"]

# 构建(3.29-3.30-3.31)
# docker build --build-arg CMAKE_VERSION=3.29.9 -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/cmake:3.29.9 .
# docker build --build-arg CMAKE_VERSION=3.30.9 -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/cmake:3.30.9 .
# docker build --build-arg CMAKE_VERSION=3.31.10 -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/cmake:3.31.10 .
# 推送
# docker push registry.cn-hangzhou.aliyuncs.com/xiaoyilin/cmake:3.29.9
# docker push registry.cn-hangzhou.aliyuncs.com/xiaoyilin/cmake:3.30.9
# docker push registry.cn-hangzhou.aliyuncs.com/xiaoyilin/cmake:3.31.10

# docker run --rm registry.cn-hangzhou.aliyuncs.com/xiaoyilin/cmake:3.29.9
# docker run --rm registry.cn-hangzhou.aliyuncs.com/xiaoyilin/cmake:3.30.9
# docker run --rm registry.cn-hangzhou.aliyuncs.com/xiaoyilin/cmake:3.31.10

# 终端
# docker run --rm -it  registry.cn-hangzhou.aliyuncs.com/xiaoyilin/cmake:3.29.9 bash
# docker run --rm -it  registry.cn-hangzhou.aliyuncs.com/xiaoyilin/cmake:3.30.9 bash
# docker run --rm -it  registry.cn-hangzhou.aliyuncs.com/xiaoyilin/cmake:3.31.10 bash